﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Bdcs.Core.Entity
{
    /// <summary>
    /// TP_ServerRefresh数据模型对象
    /// </summary>
    [Serializable]
    public partial class TP_ServerRefreshMod
    {
        /// <summary>
        /// 初始化TP_ServerRefresh数据模型对象
        /// </summary>
        public TP_ServerRefreshMod()
        {
            
        }
        /// <summary>
        /// 初始化TP_ServerRefresh数据模型对象并给所有字段赋值
        /// </summary>
        /// <param name="key">Key</param>
        /// <param name="bstate">bstate</param>
        /// <param name="changeTime">ChangeTime</param>
        public TP_ServerRefreshMod(string key,int bstate,DateTime changeTime)
        {
            //给Key字段赋值
            this.Key = key;
            //给bstate字段赋值
            this.Bstate = bstate;
            //给ChangeTime字段赋值
            this.ChangeTime = changeTime;
        }
        
		//属性存储数据的变量
        private string _key;
        private int _bstate;
        private DateTime _changeTime;
        
        /// <summary>
        /// Key
        /// </summary>
        public string Key
        {
            get { return this._key; }
            set { this._key = value; }
        }
        /// <summary>
        /// bstate
        /// </summary>
        public int Bstate
        {
            get { return this._bstate; }
            set { this._bstate = value; }
        }
        /// <summary>
        /// ChangeTime
        /// </summary>
        public DateTime ChangeTime
        {
            get { return this._changeTime; }
            set { this._changeTime = value; }
        }
        
        /// <summary>
        /// 对比两个TP_ServerRefresh数据模型对象是否一致
        /// </summary>
        /// <param name="obj">要进行比对的TP_ServerRefresh数据模型对象</param>
        /// <returns>返回是否一致，为true一致，为false不一致</returns>
        public override bool Equals(object obj)
        {
            //判断传入对象是否为null
            if (obj == null) return false;
            //将传入对象转换成TP_ServerRefresh数据模型对象
            TP_ServerRefreshMod tP_ServerRefreshMod = obj as TP_ServerRefreshMod;
            //判断是否转换成功
            if (tP_ServerRefreshMod == null) return false;
            //进行匹配属性的值
            return
                //判断Key是否一致
                this.Key == tP_ServerRefreshMod.Key &&
                //判断bstate是否一致
                this.Bstate == tP_ServerRefreshMod.Bstate &&
                //判断ChangeTime是否一致
                this.ChangeTime == tP_ServerRefreshMod.ChangeTime;
        }
        /// <summary>
        /// 将当前TP_ServerRefresh数据模型对象转换成哈希码
        /// </summary>
        /// <returns>哈希值</returns>
        public override int GetHashCode()
        {
            //将TP_ServerRefresh数据模型对象的属性进行按位异或运算处理得到哈希码并返回
            return
                //将Key进行按位异或运算处理
                (this.Key == null ? 2147483647 : this.Key.GetHashCode()) ^
                //将bstate进行按位异或运算处理
                this.Bstate.GetHashCode() ^
                //将ChangeTime进行按位异或运算处理
                this.ChangeTime.GetHashCode();
        }
        /// <summary>
        /// 将当前TP_ServerRefresh数据模型对象转换成字符串副本【仅显示在SQL中不能为空的列】
        /// </summary>
        /// <returns>字符串形式副本</returns>
        public override string ToString()
        {
            //将当前TP_ServerRefresh数据模型对象转换成字符串副本
            return
                "[" +
                //将Key转换成字符串
                this.Key + "," +
                //将bstate转换成字符串
                this.Bstate + "," +
                //将ChangeTime转换成字符串
                this.ChangeTime +
                "]";
        }
    }
}
